package com.czx.common.utils;

import java.util.HashMap;

public class R extends HashMap {
    public static R success(){
        R r =new R();
        r.put("code",200);
        return r;
    }

    public static R success(Object data){
        R success = success();
        success.put("data",data);
        return success;
    }

    public static R fail(){
        R r=new R();
        r.put("code",500);
        return r;
    }

    public static R fail(String msg){
        R fail = fail();
        fail.put("msg",msg);
        return fail;
    }
}
